package com.aqie.advanced.template;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @Function:
 * @Author: aqie
 * @Date: 2019/9/6 8:58
 */
@Controller
@RequestMapping("th")
public class IndexController {
    @GetMapping
    public String index(Model model){
        model.addAttribute("name","aqie");
        return "index";
    }

    // 这是干什么用的？？？
    @ModelAttribute("wife")
    public String wife(){
        return "cium";
    }
}
